package com.houserent.controller;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.houserent.entry.HouseResult;
import com.houserent.service.MsgService;

@Controller
@RequestMapping("/msg")
public class MsgController {

    @Resource
    private MsgService msg;

    @ResponseBody
    @RequestMapping("/getAllMassageInfo.do")
    public HouseResult getAllMassageInfo(String userId) {
        return msg.getAllMassageInfo(userId);
    }

    @ResponseBody
    @RequestMapping("/sendMsg.do")
    public HouseResult sendMsg(String authorId, String reciver, String msgType, String msgTatile, String msgContent) {
        return msg.sendMsg(authorId, reciver, msgType, msgTatile, msgContent);
    }

    @ResponseBody
    @RequestMapping("/modifyReadTag.do")
    public HouseResult modifyReadTag(String msgId, String userId) {
        return msg.modifyReadTag(msgId, userId);
    }
}
